﻿@namespace BootstrapBlazor.Components
@typeparam TItem
@inherits TableBase<TItem>

<table @attributes="@AdditionalAttributes" id="@Id" class="@ClassName">
    <thead>
        <TableHeaderCollection>
            <TableHeaderContent />
            @HeaderTemplate?.Invoke(HeaderModel)
        </TableHeaderCollection>
    </thead>
    <tbody>
        @if (Items != null)
        {
            for (int index = 0; index < Items.Count(); index++)
            {
                <tr>
                    @RowTemplate?.Invoke(Items.ElementAt(index))
                </tr>
            }
        }
    </tbody>
</table>
